using System;
using Sinacor.Servico.Bovespa.Ordens.Service.DataContract.Request;
using Sinacor.Servico.Bovespa.Ordens.BusinessEntity;

namespace Sinacor.Servico.Bovespa.Ordens.Service.ServiceImplementation.Translator
{
    public static class TranslateBetweenConsultarObservacaoRequestAndObservacao
    {


        public static Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Observacao TranslateConsultarObservacaoRequestToObservacao(Sinacor.Servico.Bovespa.Ordens.Service.DataContract.Request.ConsultarObservacaoRequest from)
        {
            Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Observacao to = new Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Observacao();
            if (to.Ordem == null) 
            to.Ordem = new BusinessEntity.Ordem();
            to.Ordem.DataOrdem = from.DataOrdem;
            to.Ordem.NumeroOrdem = from.NumeroOrdem;
            to.Ordem.NumeroOrdemSubSequencia = from.NumeroOrdemSequencia;

            return to;
        }
    }
}

